
#include"comm.h"


int main()
{
	int msg_id=use_msgid();
	msgvp client;
	char my_buf[_MAX_BUF_]; 
	while(1)
	{
		printf("please write to server:");
		fflush(stdout);
		int size=read(0,my_buf,_MAX_BUF_);
		if(size>0)
		{
			my_buf[size]='\0';
		}
		msg_send(msg_id,&client,sizeof(client),my_buf,_CLIENT_ID_);
		
		
		sleep(5);
		msg_receive(msg_id,&client,sizeof(client),_SERVER_ID_);
		printf("server:%s",client.mmsg_buf);

	}
	return 0;
}
